/*============================================================================
 PROJECT: TalkWrench
 FILE:    BaseViewController.h
 AUTHOR:  Nguyen Minh Khoai
 DATE:    1/30/13
 =============================================================================*/

/*============================================================================
 IMPORT
 =============================================================================*/
#import <UIKit/UIKit.h>
#import "UIBarButtonItem+Customizes.h"
#import "ProgressView.h"
#import "JSBadgeView.h"
#import "CustomNavigationBar.h"

/*============================================================================
 MACRO
 =============================================================================*/

/*============================================================================
 PROTOCOL
 =============================================================================*/

/*============================================================================
 Interface:   BaseViewController
 =============================================================================*/


@interface BaseViewController : UIViewController<ProgressViewDelegate> {
    BOOL hiddenBackButton;
}

@property (nonatomic, strong) ProgressView *progressView;
@property (nonatomic, assign) BOOL hiddenBackButton;
@property (nonatomic, assign) BOOL hiddenRightButton;
@property (nonatomic, strong) UILabel  *titleLabel;
@property (nonatomic, strong) NSString *titleLabelString;
@property (nonatomic, strong) NSString *leftButtonImageName;
@property (nonatomic, strong) NSString *rightButtonImageName;
@property (nonatomic, strong) NSString *rightButtonTitle;
@property (nonatomic, strong) UIImageView *backgroundImageView;
@property (nonatomic, assign) CGFloat navigationBarButtonPadding;
@property (nonatomic, assign) BOOL hasBadgeView;
@property (strong, nonatomic) JSBadgeView *badgeView;
@property (strong, nonatomic) IBOutlet CustomNavigationBar *customNavigationBar;
@property (assign, nonatomic) BOOL processing;
@property (assign, nonatomic) BOOL enablePinToZoomAtPoint;

- (void)updateBadgeNumber;
- (void)setUpNavigationBar;
- (void)didTouchedOnLeftButton:(id)sender;
- (void)didTouchedOnRightButton:(id)sender;

- (void)showLoadingViewWithMessage:(NSString *)message;
- (void)showLoadingView;
- (void)hideLoadingView;

- (void)doLayout:(UIInterfaceOrientation)orientation;
- (BOOL)validateField:(UIView *)field;
- (BOOL)doValidation;
- (void)registerNotifications;
- (void)unregisterNotifications;

@end
